package com.it.bean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author agstar
 */
@Component
public class Rainbow {
    private  Red red;
    private  Blue blue;

    /*public Rainbow(Red red, Blue blue) {
        this(red);
        System.out.println("--------2参数的构造器-----------");
        this.red = red;
        this.blue = blue;
    }

    public Rainbow(Red red) {
        System.out.println("--------red参数的构造器-----------");
        this.red = red;
    }
    public Rainbow(Blue blue) {
        System.out.println("--------blue参数的构造器-----------");
        this.blue = blue;
    }

    public Rainbow() {
        System.out.println("--------无参数的构造器-----------");
    }*/

    public Red getRed() {
        return red;
    }

    public void setRed(Red red) {
        this.red = red;
    }

    public Blue getBlue() {
        return blue;
    }

    public void setBlue(Blue blue) {
        this.blue = blue;
    }
}
